import React, { Component } from 'react';
import DemoChild1 from "./Child1"
//书写组件啊
class Parent extends Component{
    state={
        role:"admin",
        userinfo:{
            name:'张三',
            age:18
        }
    }
    render(){
        console.log('===',this)
        return(
            <div className='parent'>
                <h3 >父传子 </h3>
                <DemoChild1 role={this.state.role} userinfo={this.state.userinfo}/>
            </div>
        )
    }
}
export default Parent;